1. Field of the Invention
The present invention relates to a system for measuring time intervals and more particularly to the implementation of an interpolation function and a calibration function for facilitating precise measurement of time intervals. Still more particularly, the present invention is directed to an integrated system in which the calibration function is provided by built-in integrated hardware.
It is desirable to measure precise time intervals, for example, in connection with the design, testing and trouble shooting of magnetic disk drives. Typically in magnetic recording using a disk drive, data is recorded in the form of digital bits (logic 1's and 0's) encoded in time dependent format such as modified frequency modulation (MFM) format. In order to analyze the performance of a disk drive, it is necessary to precisely evaluate the effect of bit jitter, peak shift, and read margin on data detection in a data recovery process. In particular, peak shift and jitter correspond to fluctuations in the positions of the data bits from their nominal positions, and read margin is related to the boundary within which the data bits can be properly detected even when there are such fluctuations in data bit positions in the data stream. These factors are all related to the phase or timing of the data bits. By measuring the precise time intervals between data bits, the extent of the effects of the aforementioned factors may be determined. For a 50 MHz disk drive system, the nominal time interval between data bits is in the order of 20 ns and the time representative of the fluctuations from the mean may be in the order of 10 ns. Thus, the resolution of a time interval measurement device applied to analyze the disk drive should be in the order of 100 ps in order for the device to be able to accurately determine the size of the fluctuations.
2. Description of the Prior Art
The operation of a prior art time interval measurement device will be described with reference to FIGS. 1 and 2. As illustrated in FIG. 1, a time interval L to be measured is defined between edges 10 and 12 of a square pulse 14 in an input signal and is determined by means of counting discrete increments of reference pulses as identified by the rising edges 16 in a reference signal, which is generated by a system clock, occurring between the beginning (edge 10) and end (edge 12) of the time interval L. The clock has a precise frequency and the period T or time base of the clock is known. The input signal is typically asynchronous to the clock signal, as the input signal is sampled with the clock already running in a stabilized state.
Referring to FIG. 2, typically the input signal is monitored by an edge detector 18 which detects the transitions from logic 1 to 0 or vice versa at the boundaries 10 and 12 of the input pulse 14 and determines whether a detected transition is a rising (logic 0 to 1) or a falling (logic 1 to 0) edge. When a transition edge is detected, a controller 20 starts or stops a counter 21 by producing a start or stop trigger, respectively, depending on the predetermined response of the controller to the two types of transition edges. For example, FIG. 1 shows a situation in which the controller produces a start trigger 20 and a stop trigger 24 to start and stop the counter 21 at the rising edge 10 and the falling edge 12, respectively, of the pulse 14. As the counter 21 is triggered to start at the rising edge of the input pulse 14, clock pulses from a system clock 26 increment the counter 21. Typically, the counter 21 is incremented at each rising edge 16 of the clock pulses following the rising edge of the start trigger 22. Hence, each rising edge 16 represents one clock pulse. At the detection of the falling edge 12 of the input signal, the controller 20 stops the counter 21. The count N of the number of rising edges of the clock signal between the start and stop of the counter is representative of the time interval L. The time interval L is approximated by multiplying N by the time base T (i.e. N.times.T). In the particular example in FIG. 1, there are four increments of clock pulses (N=4) during the measured time interval.
The prior art device is subjected to several limitations and drawbacks. For example, the accuracy of the time interval measurements by the prior art device is partly determined by whether an integral number of discrete system clock pulses can fit completely and exactly within the boundaries 10 and 12 of the time interval L. Referring to FIG. 1, because the input signal as shown is asynchronous to the clock signal, the interval time represented by N.times.T does not include the time interval A from the start of the interval L to the next rising edge 16 of the clock pulse following the start of the interval L. On the other hand, the same interval time N.times.T includes the time interval B from the end of the time interval to the next rising edge 16 of the clock pulse following the end of the interval L. Absent any systematic errors, if A and B are of the same value, there would be no error in the measured interval time as provided by the direct count N of the discrete clock pulses. However, since A and B may be of different lengths, the interval represented by N.times.T may be different from the actual time interval L of the input pulse. The difference between the measured and the actual interval time L depends on the values of intervals A and B, or more particularly, on the difference between intervals A and B (A-B). This difference could be as large as the period T. The resolution of the time interval measurement described above is thus plus or minus the selected time base T.
Although the resolution and thus the accuracy of the time interval measurements may be improved by choosing a smaller time base, this option is often limited by the frequency capability of available system clocks. Typically, it may be practical to employ in a system a clock which is capable of generating pulses of precise frequency of up to 100 MHz which will provide a 10 ns time base, or resolution. However, in order to achieve a resolution of 100 ps, it would require a precision 10 GHz clock which would substantially increase the complexity of the hardware and the cost of the system, thus rendering the use of such clock impractical.
Aside from using a smaller time base for the system clock, one method of improving the resolution of the time interval measurement described above is to interpolate the values of intervals A and B which correspond to partial clock periods. A time interval measuring device Universal Counter Model HP5334A manufactured by Hewlett Packard, Inc. measures the respective time that is required to recharge a capacitor which was caused to discharge from a predetermined charge level during the periods between the start and end of intervals A and B, respectively. The respective recharging time represents the intervals A and B. The recharging rate used is lower than the discharging rate in order to yield a good resolution. Such device, however, has a relatively long system processing time for each measurement of intervals A and B. Thus the highest available sampling rate of the system is relatively low.
Another limitation of the prior art time interval measurement device is that there is no provision in the device for calibration of the device in its actual operation condition. Typically, a manufacturer of the prior art device calibrates the device for a nominal operating condition, e.g., a nominal operating temperature. The calibration observed at the manufacturer's test bench can be substantially eroded by factors over which the manufacturer has little control once the device leaves the manufacturing plant. For example, in the actual operation of the device, the temperature of the environment can alter the characteristics of the circuit components in the device since the device is typically made up of temperature dependent components. Due to the complex interactions of the temperature dependent components, it would be difficult to determine a fixed offset to compensate for the effect of temperature. Hence it would be necessary to recalibrate the device in the particular environment in which it is used. In addition, it may be necessary to recalibrate the device to remove systematic errors arising from, for example, aging of the components which may cause undesirable delays in the response of the circuit components.
Moreover, the user typically does not have the external equipment necessary for calibration. The device has to be shipped to, for example, the manufacturer for calibration. The down-time of the device would be increased thereby causing inconvenience to the user.